package com.itheima.demo1;

public class Diannao{
    public void powerOn(){
        System.out.println("开机");
    }
    public void powerOff(){
        System.out.println("关机");
    }
    public void useDevice(USB usb){
        if (usb instanceof Jianpan){
            Jianpan j=(Jianpan)usb;
        }else if (usb instanceof Shubiao){
            Shubiao j=(Shubiao)usb;
        }

    }
}
